﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using NHibernate;
using FluentNHibernate.Data;

namespace BankCreditPortfolio.DAL.Entities
{
    public class Role 
    {
        public virtual int RoleId { get; set; }
        public virtual string Title { get; set; }
    }

    public class RoleMap : ClassMap<Role>
    {
        public RoleMap()
        {
            Id(x => x.RoleId).GeneratedBy.HiLo("role");
            Id(x => x.RoleId).Unique();
            Map(x => x.Title);
            Table("Role");
        }
    }
}
